//
//  contactViewController.m
//  诗韵
//
//  Created by Song on 2018/3/8.
//  Copyright © 2018年 Song. All rights reserved.
//

#import "contactViewController.h"

@interface contactViewController ()

@end

@implementation contactViewController

//-(void)viewWillAppear:(BOOL)animated {
//    [super viewWillAppear:animated];
//    
//    self.tabBarController.tabBar.hidden = NO;
//}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupNav];
}

// 设置导航栏
-(void)setupNav {
    
    UIButton *rightbtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [rightbtn setImage:[UIImage imageNamed:@"touxiang1"] forState:UIControlStateNormal];
    [rightbtn addTarget:self action:@selector(iconClick) forControlEvents:UIControlEventTouchUpInside];
//    [rightbtn sizeToFit];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightbtn];
    
    UITextField *text = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, 280, 25)];
    //    text.backgroundColor = [UIColor redColor];
    text.background = [UIImage imageNamed:@"input"];
    text.placeholder = @" 请输入关键字进行搜索";
    [text setFont:[UIFont systemFontOfSize:14]];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:text];
    
    
}

-(void)iconClick {
    
}

@end
